package com.px.device.domain;

import com.px.common.annotation.Excel;
import com.px.common.core.domain.BaseEntity;
import com.px.common.config.MinIoClientConfig;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 航线基础信息对象 routes_info
 * 
 * @author WRJ
 * @date 2024-08
 */
public class RoutesInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 航线主键id */
    @ApiModelProperty(value = "航线主键id")
    private Long routesId;

    /** 机场id */
    @ApiModelProperty(value = "机场id")
    @Excel(name = "机场id")
    private Long airportId;

    /** 航线名称 */
    @ApiModelProperty(value = "航线名称")
    @Excel(name = "航线名称")
    private String routesName;

    /** 航线起点 */
    @ApiModelProperty(value = "航线起点")
    @Excel(name = "航线起点")
    private String routesStartPoint;

    /** 航线终点 */
    @ApiModelProperty(value = "航线终点")
    @Excel(name = "航线终点")
    private String routesEndPoint;

    /** 航线里程(米) */
    @ApiModelProperty(value = "航线里程(米)")
    @Excel(name = "航线里程(米)")
    private Integer routeMileage;

    /** 航线kmz地址 */
    @ApiModelProperty(value = "航线kmz地址")
    @Excel(name = "航线kmz地址")
    private String routesPath;

    private String routesMioioPath;

    /** 航线图片url */
    @ApiModelProperty(value = "航线图片url")
    @Excel(name = "航线图片url")
    private String routesUrl;

    /** 航线图片url */
    @ApiModelProperty(value = "航线图片预览url")
    @Excel(name = "航线图片预览url")
    private String routesPreviewUrl;

    private String airportName;

    public String getAirportName() {
        return airportName;
    }

    public void setAirportName(String airportName) {
        this.airportName = airportName;
    }

    public void setRoutesId(Long routesId)
    {
        this.routesId = routesId;
    }

    public Long getRoutesId() 
    {
        return routesId;
    }
    public void setAirportId(Long airportId) 
    {
        this.airportId = airportId;
    }

    public Long getAirportId() 
    {
        return airportId;
    }
    public void setRoutesName(String routesName) 
    {
        this.routesName = routesName;
    }

    public String getRoutesName() 
    {
        return routesName;
    }
    public void setRoutesStartPoint(String routesStartPoint) 
    {
        this.routesStartPoint = routesStartPoint;
    }

    public String getRoutesStartPoint() 
    {
        return routesStartPoint;
    }
    public void setRoutesEndPoint(String routesEndPoint) 
    {
        this.routesEndPoint = routesEndPoint;
    }

    public String getRoutesEndPoint() 
    {
        return routesEndPoint;
    }
    public void setRoutesPath(String routesPath) 
    {
        this.routesPath = routesPath;
    }

    public String getRoutesPath() 
    {
        return routesPath;
    }
    public void setRoutesUrl(String routesUrl) 
    {
        this.routesUrl = routesUrl;
    }

    public String getRoutesUrl() 
    {
        return routesUrl;
    }

    public Integer getRouteMileage() {
        return routeMileage;
    }

    public void setRouteMileage(Integer routeMileage) {
        this.routeMileage = routeMileage;
    }

    public String getRoutesPreviewUrl() {
        if (null != routesUrl && routesUrl.startsWith("http")) {
            return routesUrl;
        } else {
            return MinIoClientConfig.PREVIEW_END_POINT_URL + "/" + routesUrl;
        }
    }

    public String getRoutesMioioPath() {
        if (null != routesPath && routesPath.startsWith("http")) {
            return routesPath;
        } else {
            return MinIoClientConfig.PREVIEW_END_POINT_URL + "/" + routesPath;
        }

    }

    public void setRoutesMioioPath(String routesMioioPath) {
        this.routesMioioPath = routesMioioPath;
    }

    public void setRoutesPreviewUrl(String routesPreviewUrl) {
        this.routesPreviewUrl = routesPreviewUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("routesId", getRoutesId())
            .append("airportId", getAirportId())
            .append("routesName", getRoutesName())
            .append("routesStartPoint", getRoutesStartPoint())
            .append("routesEndPoint", getRoutesEndPoint())
            .append("routesPath", getRoutesPath())
            .append("routesUrl", getRoutesUrl())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
